package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentShopClientFallBack;
import cn.cs.pojo.Agent;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cs-shop-provider", configuration = CsConfiguration.class, fallback = AgentShopClientFallBack.class)
public interface AgentShopClient {
    @RequestMapping(value = "/getShopByAgentId", method = RequestMethod.POST)
    Map<String,Object> getShopByAgentId(@RequestParam("id")String id);
    @RequestMapping(value = "/updateAgentShopById", method = RequestMethod.POST)
    int updateAgentShopById(@RequestBody Map<String, Object> map);
    @RequestMapping(value = "/getTOdayEar", method = RequestMethod.POST)
    String getTOdayEar(@RequestParam("id")String id);
    @RequestMapping(value = "/getOrderList", method = RequestMethod.POST)
    List<Map<String,Object>> getOrderList(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/getProsByOrderId", method = RequestMethod.POST)
    List<Map<String,Object>> getProsByOrderId(@RequestParam("orderId")String orderId);
    @RequestMapping(value = "/doSendOrderById", method = RequestMethod.POST)
    int doSendOrderById(@RequestBody Map<String, Object> order);
    @RequestMapping(value = "/getTodayAssets", method = RequestMethod.POST)
    String getTodayAssets(@RequestParam("id")String id);
    @RequestMapping(value = "/getSetAssets", method = RequestMethod.POST)
    String getSetAssets(@RequestParam("id")String id);
    @RequestMapping(value = "/getAllAssets", method = RequestMethod.POST)
    String getAllAssets(@RequestParam("id")String id);
    @RequestMapping(value = "/getsetList", method = RequestMethod.POST)
    List<Map<String,Object>> getsetList(@RequestParam("id")String id);
    @RequestMapping(value = "/getAssetsList", method = RequestMethod.POST)
    List<Map<String,Object>> getAssetsList(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/getPolicy", method = RequestMethod.POST)
    List<Map<String,Object>> getPolicy();
    @RequestMapping(value = "/getLastSettlement", method = RequestMethod.POST)
    Map<String,Object> getLastSettlement(@RequestParam("id")String id);
    @RequestMapping(value = "/getAgentById", method = RequestMethod.POST)
    Map<String,Object> getAgentById(@RequestParam("id")String id);
    @RequestMapping(value = "/getSetMoney", method = RequestMethod.POST)
    String getSetMoney(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/getProSet", method = RequestMethod.POST)
    Map<String,Object> getProSet();
    @RequestMapping(value = "/insertAgentSet", method = RequestMethod.POST)
    int insertAgentSet(@RequestBody Map<String, Object> setMap);
    @RequestMapping(value = "/getSetOrderList", method = RequestMethod.POST)
    List<Map<String,Object>> getSetOrderList(@RequestBody Map<String, Object> param);
    @RequestMapping(value = "/insertSetOrder", method = RequestMethod.POST)
    int insertSetOrder(@RequestBody Map<String, Object> setOrderMap);
    @RequestMapping(value = "/getOrderCount", method = RequestMethod.POST)
    Map<String,Object> getOrderCount(@RequestParam("id")String id);

    @RequestMapping(value = "/getAgentNumberByAgentId", method = RequestMethod.POST)
    public Long getAgentNumberByAgentId(@RequestParam("invitationCode") String invitationCode, @RequestBody List<Agent> list) throws Exception;
}
